class template specialization
<array>

std::tuple_size<array>

template <class Tpl> class tuple_size;     // unspecializedtemplate <class T, size_t N>  struct tuple_size< array<T,N> >;         // array specialization
Tuple size traits for array
Accesses the size of an array object as if it was a tuple.

This class provides the size of the array (N) as the constexpr member value of type size_t, as if inheriting integral_constant:
This class provides the size of the array (N) as the constexpr member value of type size_t by inheriting integral_constant:

1
2
3
template <class Tpl> class tuple_size;
template <class T, size_t N>
  struct tuple_size< array<T,N> > : integral_constant <size_t,N> {};

See tuple_size for more information.

Template parameters

Tpl
Type for which the size is to be obtained: array<T,N>.
T
Type of the elements contained.
N
Size of the array, in terms of number of elements.
Aliased as member value.
size_t is an unsigned integral type.

Member contants

member constantdefinition
valueN (the size of the array).
This is a constexpr value of the unsigned integral type size_t.

See also